{extend name="public/base" /}

{block name="title"}<title>{$Think.lang.list}</title>{/block}

{block name="pjax_container"}
<div class="hry-content-wrapper">
<section class="content-header">
    <ol class="breadcrumb">
        <li>项目管理</li>
        <li class="active">待审核列表</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="hry-form-wrapper">
                <div class="box-header with-border" style="padding:15px;">
                    <h3 class="box-title"></h3>
                    {include file="public/project_search2" /}
                </div>
                <div class="box-body table-responsive">
                    <table class="table table-bordered table-hover table-sort">
                        <tr>
                            <th>{$Think.lang.id}{:table_sort('id')}</th>
                            <th>{$Think.lang.thumb}</th>
                            <th>{$Think.lang.title}</th>
                            <th>{$Think.lang.target_code}{:table_sort('target_code')}</th>
							<th>{$Think.lang.project_type}</th>
                            <th>{$Think.lang.initiator}</th>
                            <th>{$Think.lang.status}</th>
                            <th>{$Think.lang.create_time}</th>
                            <th width="178">{$Think.lang.action}</th>
                        </tr>
                        {volist name="dataList" id="vo"}
                        <tr>
                            <td>{$vo.id}</td>
							 <td><img src="{$vo.thumb}" width="50" height="30"></td>
                            <td>
								<span class="editable" data-pk="{$vo.id}" data-name="project_name" data-url="{:url(CONTROLLER_NAME.'/edit', 'id='.$vo['id'])}" >{$vo.project_name}</span>
                            </td>
                            <td>{$vo.target_code}</td>
                            <td>{if condition="$vo.project_type eq 1"}{$Think.lang.project_type1}{else}{$Think.lang.project_type2}{/if}</td>
                            <td>{if condition="$vo.company_name"}{$vo.company_name}{else}{$Think.lang.noinitiator}{/if}</td>
							<td>{$PstatusList[$vo.status]}</td>
							<td>{$vo.create_time}</td>
                            <td>
								{if condition="$status eq 0"}
								<a class="btn-text btn-success btn-xs" href="{:url('Project/Pyes',['id'=>$vo.id])}">待审核</a>
								{/if}
								 
                            </td>
                        </tr>
                        {/volist}
                    </table>
                </div>
                <div class="box-footer clearfix">
                    {$dataList->render()}
                </div>
            </div>
        </div>
    </div>
</section>
</div>
<script type="text/javascript">
$(function(){
    /*ajax页面加载icheck，有该控件的页面才需要*/
    $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
        checkboxClass: 'icheckbox_minimal-blue',
        radioClass: 'iradio_minimal-blue'
    });
    
    /*ajax页面加载icheck，有该控件的页面才需要*/
    $(".select2").select2({language:"zh-CN"});
    
    /*全选-反选*/
    $('.checkbox-toggle').on('ifChecked', function(event){
        var _this = $(this);
        var _table = _this.closest('.table');
        _table.find("tr td input[type='checkbox']").iCheck("check");
    });
    $('.checkbox-toggle').on('ifUnchecked', function(event){
        var _this = $(this);
        var _table = _this.closest('.table');
        _table.find("tr td input[type='checkbox']").iCheck("uncheck");
    });
    
    $('.editable').editable({
        emptytext: "empty",
        params: function(params) {      //参数
            var data = {};
            data['id'] = params.pk;
            data[params.name] = params.value;
            return data;
        },
        success: function(response, newValue) {
            var res = $.parseJSON( response );
            if(res.status == 1){
            }else{
                return res.info;
            }
        }
    });
    
    {if condition=" $rest_login == 1 "}
    restlogin('{$rest_login_info}');   //登录超时
    {/if}
})
</script>
{/block}